<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: ActionController::AbstractResponse</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">ActionController::AbstractResponse</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/vendor/rails/actionpack/lib/action_controller/response_rb.html">
                vendor/rails/actionpack/lib/action_controller/response.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Represents an HTTP response generated by a controller action. One can use
an <a href="AbstractResponse.html">ActionController::AbstractResponse</a>
object to retrieve the current state of the response, or customize the
response. An <a href="AbstractResponse.html">AbstractResponse</a> object
can either represent a &quot;real&quot; HTTP response (i.e. one that is
meant to be sent back to the web browser) or a test response (i.e. one that
is generated from integration tests). See CgiResponse and <a
href="TestResponse.html">TestResponse</a>, respectively.
</p>
<p>
<a href="AbstractResponse.html">AbstractResponse</a> is mostly a Ruby on <a
href="../Rails.html">Rails</a> framework implement detail, and should never
be used directly in controllers. Controllers should use the methods defined
in <a href="Base.html">ActionController::Base</a> instead. For example, if
you want to set the HTTP response&#8216;s content MIME type, then use
ActionControllerBase#headers instead of AbstractResponse#headers.
</p>
<p>
Nevertheless, integration tests may want to inspect controller responses in
more detail, and that&#8216;s when <a
href="AbstractResponse.html">AbstractResponse</a> can be useful for
application developers. Integration test methods such as
ActionController::Integration::Session#get and
ActionController::Integration::Session#post return objects of type <a
href="TestResponse.html">TestResponse</a> (which are of course also of type
<a href="AbstractResponse.html">AbstractResponse</a>).
</p>
<p>
For example, the following demo integration &quot;test&quot; prints the
body of the controller response to the console:
</p>
<pre>
 class DemoControllerTest &lt; ActionController::IntegrationTest
   def test_print_root_path_to_console
     get('/')
     puts @response.body
   end
 end
</pre>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M001105">assign_default_content_type_and_charset!</a>&nbsp;&nbsp;
      <a href="#M001096">charset</a>&nbsp;&nbsp;
      <a href="#M001095">charset=</a>&nbsp;&nbsp;
      <a href="#M001094">content_type</a>&nbsp;&nbsp;
      <a href="#M001093">content_type=</a>&nbsp;&nbsp;
      <a href="#M001100">etag</a>&nbsp;&nbsp;
      <a href="#M001102">etag=</a>&nbsp;&nbsp;
      <a href="#M001101">etag?</a>&nbsp;&nbsp;
      <a href="#M001097">last_modified</a>&nbsp;&nbsp;
      <a href="#M001099">last_modified=</a>&nbsp;&nbsp;
      <a href="#M001098">last_modified?</a>&nbsp;&nbsp;
      <a href="#M001091">location</a>&nbsp;&nbsp;
      <a href="#M001092">location=</a>&nbsp;&nbsp;
      <a href="#M001088">new</a>&nbsp;&nbsp;
      <a href="#M001106">prepare!</a>&nbsp;&nbsp;
      <a href="#M001103">redirect</a>&nbsp;&nbsp;
      <a href="#M001104">sending_file?</a>&nbsp;&nbsp;
      <a href="#M001089">status</a>&nbsp;&nbsp;
      <a href="#M001090">status=</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">DEFAULT_HEADERS</td>
          <td>=</td>
          <td class="context-item-value">{ &quot;Cache-Control&quot; =&gt; &quot;no-cache&quot; }</td>
        </tr>
        </table>
      </div>
    </div>



    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">assigns</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">body</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The body content (e.g. HTML) of the response, as a String.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">cookies</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">headers</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The headers of the response, as a Hash. It maps header names to header
values.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">layout</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">redirected_to</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">redirected_to_method_params</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">request</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">session</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">template</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M001088" class="method-detail">
        <a name="M001088"></a>

        <div class="method-heading">
          <a href="#M001088" class="method-signature">
          <span class="method-name">new</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001088-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001088-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 45</span>
45:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
46:       <span class="ruby-ivar">@body</span>, <span class="ruby-ivar">@headers</span>, <span class="ruby-ivar">@session</span>, <span class="ruby-ivar">@assigns</span> = <span class="ruby-value str">&quot;&quot;</span>, <span class="ruby-constant">DEFAULT_HEADERS</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-value str">&quot;cookie&quot;</span> =<span class="ruby-operator">&gt;</span> []), [], []
47:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M001105" class="method-detail">
        <a name="M001105"></a>

        <div class="method-heading">
          <a href="#M001105" class="method-signature">
          <span class="method-name">assign_default_content_type_and_charset!</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001105-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001105-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 131</span>
131:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assign_default_content_type_and_charset!</span>
132:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">content_type</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">HTML</span>
133:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">charset</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">default_charset</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">sending_file?</span>
134:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001096" class="method-detail">
        <a name="M001096"></a>

        <div class="method-heading">
          <a href="#M001096" class="method-signature">
          <span class="method-name">charset</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001096-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001096-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 90</span>
90:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">charset</span>
91:       <span class="ruby-identifier">charset</span> = <span class="ruby-constant">String</span>(<span class="ruby-identifier">headers</span>[<span class="ruby-value str">&quot;Content-Type&quot;</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">headers</span>[<span class="ruby-value str">&quot;type&quot;</span>]).<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;;&quot;</span>)[<span class="ruby-value">1</span>]
92:       <span class="ruby-identifier">charset</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">charset</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;=&quot;</span>)[<span class="ruby-value">1</span>]
93:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001095" class="method-detail">
        <a name="M001095"></a>

        <div class="method-heading">
          <a href="#M001095" class="method-signature">
          <span class="method-name">charset=</span><span class="method-args">(charset)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Set the <a href="AbstractResponse.html#M001096">charset</a> of the
Content-Type header. Set to nil to remove it. If no content type is set, it
defaults to HTML.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001095-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001095-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 81</span>
81:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">charset=</span>(<span class="ruby-identifier">charset</span>)
82:       <span class="ruby-identifier">headers</span>[<span class="ruby-value str">&quot;Content-Type&quot;</span>] =
83:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">charset</span>
84:           <span class="ruby-node">&quot;#{content_type || Mime::HTML}; charset=#{charset}&quot;</span>
85:         <span class="ruby-keyword kw">else</span>
86:           <span class="ruby-identifier">content_type</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">HTML</span>.<span class="ruby-identifier">to_s</span>
87:         <span class="ruby-keyword kw">end</span>
88:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001094" class="method-detail">
        <a name="M001094"></a>

        <div class="method-heading">
          <a href="#M001094" class="method-signature">
          <span class="method-name">content_type</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the response&#8216;s content MIME type, or nil if content type has
been set.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001094-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001094-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 74</span>
74:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content_type</span>
75:       <span class="ruby-identifier">content_type</span> = <span class="ruby-constant">String</span>(<span class="ruby-identifier">headers</span>[<span class="ruby-value str">&quot;Content-Type&quot;</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">headers</span>[<span class="ruby-value str">&quot;type&quot;</span>]).<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;;&quot;</span>)[<span class="ruby-value">0</span>]
76:       <span class="ruby-identifier">content_type</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">content_type</span>
77:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001093" class="method-detail">
        <a name="M001093"></a>

        <div class="method-heading">
          <a href="#M001093" class="method-signature">
          <span class="method-name">content_type=</span><span class="method-args">(mime_type)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Sets the HTTP response&#8216;s content MIME type. For example, in the
controller you could write this:
</p>
<pre>
 response.content_type = &quot;text/plain&quot;
</pre>
<p>
If a character set has been defined for this response (see <a
href="AbstractResponse.html#M001095">charset=</a>) then the character set
information will also be included in the content type information.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001093-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001093-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 64</span>
64:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content_type=</span>(<span class="ruby-identifier">mime_type</span>)
65:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">headers</span>[<span class="ruby-value str">&quot;Content-Type&quot;</span>] =
66:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mime_type</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/charset/</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">c</span> = <span class="ruby-identifier">charset</span>).<span class="ruby-identifier">nil?</span>
67:           <span class="ruby-identifier">mime_type</span>.<span class="ruby-identifier">to_s</span>
68:         <span class="ruby-keyword kw">else</span>
69:           <span class="ruby-node">&quot;#{mime_type}; charset=#{c}&quot;</span>
70:         <span class="ruby-keyword kw">end</span>
71:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001100" class="method-detail">
        <a name="M001100"></a>

        <div class="method-heading">
          <a href="#M001100" class="method-signature">
          <span class="method-name">etag</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001100-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001100-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 109</span>
109:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">etag</span>
110:       <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'ETag'</span>]
111:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001102" class="method-detail">
        <a name="M001102"></a>

        <div class="method-heading">
          <a href="#M001102" class="method-signature">
          <span class="method-name">etag=</span><span class="method-args">(etag)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001102-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001102-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 117</span>
117:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">etag=</span>(<span class="ruby-identifier">etag</span>)
118:       <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'ETag'</span>] = <span class="ruby-node">%(&quot;#{Digest::MD5.hexdigest(ActiveSupport::Cache.expand_cache_key(etag))}&quot;)</span>
119:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001101" class="method-detail">
        <a name="M001101"></a>

        <div class="method-heading">
          <a href="#M001101" class="method-signature">
          <span class="method-name">etag?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001101-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001101-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 113</span>
113:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">etag?</span>
114:       <span class="ruby-identifier">headers</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">'ETag'</span>)
115:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001097" class="method-detail">
        <a name="M001097"></a>

        <div class="method-heading">
          <a href="#M001097" class="method-signature">
          <span class="method-name">last_modified</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001097-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001097-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 95</span>
95:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">last_modified</span>
96:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">last</span> = <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'Last-Modified'</span>]
97:         <span class="ruby-constant">Time</span>.<span class="ruby-identifier">httpdate</span>(<span class="ruby-identifier">last</span>)
98:       <span class="ruby-keyword kw">end</span>
99:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001099" class="method-detail">
        <a name="M001099"></a>

        <div class="method-heading">
          <a href="#M001099" class="method-signature">
          <span class="method-name">last_modified=</span><span class="method-args">(utc_time)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001099-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001099-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 105</span>
105:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">last_modified=</span>(<span class="ruby-identifier">utc_time</span>)
106:       <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'Last-Modified'</span>] = <span class="ruby-identifier">utc_time</span>.<span class="ruby-identifier">httpdate</span>
107:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001098" class="method-detail">
        <a name="M001098"></a>

        <div class="method-heading">
          <a href="#M001098" class="method-signature">
          <span class="method-name">last_modified?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001098-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001098-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 101</span>
101:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">last_modified?</span>
102:       <span class="ruby-identifier">headers</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">'Last-Modified'</span>)
103:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001091" class="method-detail">
        <a name="M001091"></a>

        <div class="method-heading">
          <a href="#M001091" class="method-signature">
          <span class="method-name">location</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001091-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001091-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 52</span>
52:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">location</span>; <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'Location'</span>] <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001092" class="method-detail">
        <a name="M001092"></a>

        <div class="method-heading">
          <a href="#M001092" class="method-signature">
          <span class="method-name">location=</span><span class="method-args">(url)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001092-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001092-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 53</span>
53:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">location=</span>(<span class="ruby-identifier">url</span>) <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'Location'</span>] = <span class="ruby-identifier">url</span> <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001106" class="method-detail">
        <a name="M001106"></a>

        <div class="method-heading">
          <a href="#M001106" class="method-signature">
          <span class="method-name">prepare!</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001106-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001106-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 136</span>
136:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prepare!</span>
137:       <span class="ruby-identifier">assign_default_content_type_and_charset!</span>
138:       <span class="ruby-identifier">handle_conditional_get!</span>
139:       <span class="ruby-identifier">set_content_length!</span>
140:       <span class="ruby-identifier">convert_content_type!</span>
141:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001103" class="method-detail">
        <a name="M001103"></a>

        <div class="method-heading">
          <a href="#M001103" class="method-signature">
          <span class="method-name">redirect</span><span class="method-args">(url, status)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001103-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001103-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 121</span>
121:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">status</span>)
122:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">status</span> = <span class="ruby-identifier">status</span>
123:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">location</span> = <span class="ruby-identifier">url</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/[\r\n]/</span>, <span class="ruby-value str">''</span>)
124:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">body</span> = <span class="ruby-node">&quot;&lt;html&gt;&lt;body&gt;You are being &lt;a href=\&quot;#{CGI.escapeHTML(url)}\&quot;&gt;redirected&lt;/a&gt;.&lt;/body&gt;&lt;/html&gt;&quot;</span>
125:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001104" class="method-detail">
        <a name="M001104"></a>

        <div class="method-heading">
          <a href="#M001104" class="method-signature">
          <span class="method-name">sending_file?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001104-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001104-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 127</span>
127:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sending_file?</span>
128:       <span class="ruby-identifier">headers</span>[<span class="ruby-value str">&quot;Content-Transfer-Encoding&quot;</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;binary&quot;</span>
129:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001089" class="method-detail">
        <a name="M001089"></a>

        <div class="method-heading">
          <a href="#M001089" class="method-signature">
          <span class="method-name">status</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001089-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001089-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 49</span>
49:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">status</span>; <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'Status'</span>] <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001090" class="method-detail">
        <a name="M001090"></a>

        <div class="method-heading">
          <a href="#M001090" class="method-signature">
          <span class="method-name">status=</span><span class="method-args">(status)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001090-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001090-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/response.rb, line 50</span>
50:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">status=</span>(<span class="ruby-identifier">status</span>) <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'Status'</span>] = <span class="ruby-identifier">status</span> <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>